<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:67:"/data/wwwroot/xcs/public/../application/index/view/index/myapp.html";i:1496456450;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>后台首页</title>
    <link rel="stylesheet" type="text/css" href="/static/css/admin.css" />
    <link rel="stylesheet" type="text/css" href="css/admin.css"/>
    <style>
        body{
            background-color: #F3F3F4;
        }
        #title{
            height: 45px;
            background-color: #515151;
            line-height: 45px;
            color: white;
            padding-left: 15px;
        }
        #flexarea{
            display: flex;
            /*justify-content: space-around;*/
            margin-top: 20px;
        }
        .item{
            display: flex;
            width: 30%;
            min-height: 1px;
            background-color: white;
            border-radius: 5px;
            border:1px solid #C9C9C9;
            margin-left: 3%;
        }
        .img{
            display: flex;
            align-items: center;
            justify-content: center;
            padding-left: 10px;
            padding-right: 10px;
            padding-bottom: 16px;
            padding-top: 16px;
        }
        .img img{
            width:103px;
            height:103px;
        }
        .describe{
            margin-top: 16px;
            margin-bottom: 16px;
            padding-right: 16px;
            display: flex;
            flex-direction: column;
        }

        .price{
            color: #E21730;
            font-size:13px;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .f13{
            font-size:13px;
        }

        .silver{
            color: #797979;
        }
    </style>
</head>
<body>
<div class="head">
    <img src="/static/img/notify.svg"/>
    <span>欢迎使用小天科技商户云平台!</span>
    <span class="right">当前门店:<span class="green"><?php echo \think\Session::get('shopname'); ?></span></span>
</div>

<div id="mycontent">
    <div id="title">全部应用>我的应用</div>
    <div id="flexarea">
        <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
        <div class="item" data-href="" data-title="<?php echo $v['appname']; ?>">
            <div class="img">
                <img src="http://operate.ctx/uploads/<?php echo $v['logourl']; ?>">
            </div>
            <div class="describe">
                <div><?php echo $v['appname']; ?></div>
                <div class="price">
                    <?php echo date("Y-m-d",$v['endtime']); ?> 过期
                </div>
                <div class="f13 silver"><?php echo $v['des']; ?></div>
            </div>
        </div>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </div>
</div>
<!--脚本开始-->
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
    $(".item").on("click",function () {
        switch(this.getAttribute("data-title")){
            case "外卖团购":
                window.location.href='<?php echo url("Index/mytakeout"); ?>';
                break;
            case "会员卡":
                window.location.href='<?php echo url("Card/mycard"); ?>';
                break;
            default:
                alert("敬请期待");
                break;
        }
    })
</script>

</body>
</html>
